package com.joeyzh.iframe.db.entity;

import com.google.gson.annotations.SerializedName;
import com.joeyzh.iframe.db.BaseDbEntity;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Transient;

/**
 * Created by Joey on 2018/10/30.
 *
 * @author Joey
 */

@Entity
public class UserEntity extends BaseDbEntity {

    @SerializedName("Id")
    private String userId;
    @Id
    @SerializedName("UserName")
    private String userName;
    private String TeamId;
    private String ShiftId;
    @Transient
    private String NId;
    /**
     * 以下是预留字段
     */
    private String password;
    private String phone;
    private String roles;
    @SerializedName("Description")
    private String dept;
    @Transient
    private long startTimeMill;
    @SerializedName("IdentityNId")
    private String IdentityNId;
    /**
     * 当前用户班组信息
     */
    private String TeamOrGroup;

    public UserEntity(String userName, String password) {
        this.userName = userName;
        this.password = password;
    }

    @Generated(hash = 726787178)
    public UserEntity(String userId, String userName, String TeamId, String ShiftId,
            String password, String phone, String roles, String dept,
            String IdentityNId, String TeamOrGroup) {
        this.userId = userId;
        this.userName = userName;
        this.TeamId = TeamId;
        this.ShiftId = ShiftId;
        this.password = password;
        this.phone = phone;
        this.roles = roles;
        this.dept = dept;
        this.IdentityNId = IdentityNId;
        this.TeamOrGroup = TeamOrGroup;
    }


    @Generated(hash = 1433178141)
    public UserEntity() {
    }


    public String getUserId() {
        return this.userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return this.userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return this.password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return this.phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getRoles() {
        return this.roles;
    }

    public void setRoles(String roles) {
        this.roles = roles;
    }

    public String getDept() {
        return this.dept;
    }

    public void setDept(String dept) {
        this.dept = dept;
    }

    public String getTeamId() {
        return this.TeamId;
    }

    public void setTeamId(String TeamId) {
        this.TeamId = TeamId;
    }

    public String getShiftId() {
        return this.ShiftId;
    }

    public void setShiftId(String ShiftId) {
        this.ShiftId = ShiftId;
    }

    public String getNId() {
        return NId;
    }

    public void setNId(String NId) {
        this.NId = NId;
    }

    public long getStartTimeMill() {
        return System.currentTimeMillis();
    }

    public void setStartTimeMill(long startTimeMill) {
        this.startTimeMill = startTimeMill;
    }

    public String getIdentityNId() {
        return IdentityNId;
    }

    public void setIdentityNId(String identityNId) {
        IdentityNId = identityNId;
    }

    public String getTeamOrGroup() {
        return TeamOrGroup;
    }

    public void setTeamOrGroup(String teamOrGroup) {
        TeamOrGroup = teamOrGroup;
    }
}
